The present invention relates to the field of digitally compressed motion video and to optimizing the transcoding or encoding of digitally compressed motion video. More particularly, embodiments of the present invention relate to methods and systems for reducing computation required to calculate optimal motion vectors from a set of initial motion vectors during video encoding.
Several video coding standards have been introduced for digital video compression. Among them are MPEG-1, MPEG-2, and MPEG-4 part 2 standardized by the ISO committee, H.261 and H.263 standardized by the ITU committee and H.264, also known as Advanced Video Coding (AVC) or MPEG-4 part 10, standardized jointly by both the ISO and ITU committee. The video compression standards define decoding techniques and part of the encoding techniques, and the modules used for compressing video include variable length coding, motion compensation, quantization and frequency domain transform. To encode a video frame, the frame is divided into blocks, each block is then coded in one of several different ways, and these include intra, inter-predictive, intra-predictive or non-coded.
To encode a block using inter-predictive coding, the block can be further divided into partitions of different sizes, and a motion vector can be used in each partition to point to another partition of the same size in a reference frame. The value of the differences between the two partitions, known as a residue, is obtained, and can then be transformed using a technique such as the discrete cosine transform (DCT). The transformed data is quantized before being entropy coded to obtain the compressed bitstream. Though the method of encoding the motion vectors and residue are well defined within each standard, the technique for searching for one motion vector to confidently predict the optimal location for a partition in the reference frame, known as motion estimation, is not defined within most of the standards.
Motion estimation is one of the most resource intensive operations for video encoding. To confidently find the global optimum motion vector used to encode a block, it is necessary to examine all possible motion vectors in every reference frame, within the values/ranges restricted by the standard. The discovery of the optimum motion vectors enables the bitstream to be encoded with the minimum bitrate and the maximum quality. This process results in very high computation resource requirement. Alternatively, in general, a sub-optimal motion vector, as compared to the global motion vector, can be found by using fast motion estimation techniques, such as the diamond search for the motion estimation, at the expense of increasing bitstream size for the same quality, or conversely reduced quality at a constrained bit rate.
In applications such as video encoding in a mobile device and video transcoding or transrating for a mobile channel in multimedia gateway, where real-time encoding is utilized, coding speed is also important. It is also desirable to reduce power consumption and reduce resource requirements used for video encoding.
On the other hand, due to the network resource limitations, it is also desirable to keep the bitrate low for the same compressed video quality. Thus, there is a need in the art for improved methods and systems for finding the right balance between compression performance and computation resource requirements to predict the optimal parameter for encoding.